/*
 * Copyright (C) 2015 - present Instructure, Inc.
 *
 * This file is part of Canvas.
 *
 * Canvas is free software: you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License as published by the Free
 * Software Foundation, version 3 of the License.
 *
 * Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 * A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
 * details.
 *
 * You should have received a copy of the GNU Affero General Public License along
 * with this program. If not, see <http://www.gnu.org/licenses/>.
 */

// this allows you to have a block-level element that does not have a defined with be horizontally centered.
// usage:
//     <div class="centered-block">
//       <div class="centered-block-wrap">
//         <div class="centered-block-inner">
//           put your the element you want centered here

.centered-block {
  width: 100%;
  overflow: hidden;
  position: relative;
  .centered-block-wrap {
    clear: left;
    margin: 0;
    padding: 0;
    position: relative;
    left: 50%;
    text-align: center;
    .centered-block-inner {
      display: block;
      margin: 0;
      padding: 0;
      position: relative;
      right: 50%;
      text-align: left;
    }
  }
}
